-
Notifications
You must be signed in to change notification settings - Fork 3
post-rank-handler #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
post-rank-handler #143
Conversation
|
💩 Code linting failed, use |
Coverage Report
Summary
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если ты не будешь каждый раз чистить табличку и заполнять ее заново, это позволит обеспечить консистентность. У тебя не будет ни единого момента, когда кто-то из лекторов будет без оценки, потому что может ты базу очистишь, а потом все ляжет и заново она не дозаполнится
а чтобы решить проблему первого заполнения, можно сделать nullable=False, default= 0, например
|
соответственно
|
|
💩 Code linting failed, use |
| rank: Mapped[int] = mapped_column( | ||
| Integer, nullable=False, server_default='0', default=0, comment="Место в рейтинге, посчитана в dwh" | ||
| ) | ||
| rank_update_ts: Mapped[datetime.datetime] = mapped_column( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
респект, правильно, что добавил
rating_api/routes/lecturer.py
Outdated
| async def delete_lecturer( | ||
| id: int, _=Depends(UnionAuth(scopes=["rating.lecturer.delete"], allow_none=False, auto_error=True)) | ||
| ): | ||
| async def delete_lecturer(id: int, allow_none=False, auto_error=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
это че такое?)
Изменения
Добавил ручку, которая кладет данные рейтинга препода в бд
Детали реализации
Check-List
blackиisortдля Back-End илиPrettierдля Front-End?